<?
$title="Subscribe With Us";
require("required/dbconnect.php");
require("required/share_function.php");
$_SESSION['pid']=7;
require("required/header.php");

$get_info=mysql_query("select * from os_contactinfo where id=1");
$i=mysql_fetch_array($get_info,MYSQL_ASSOC);
$websitename_eng=$i['website_name'];

?>
<script type="text/javascript">
var RecaptchaOptions = {
    theme : 'clean'
};

function frmValidate(frm1){
	if(document.frm1.sub_first_name.value=="")
	{
		alert("Please enter your first name");
		document.frm1.sub_name.focus();
		return false;
	}
	
	if(document.frm1.sub_last_name.value=="")
	{
		alert("Please enter your last name");
		document.frm1.sub_name.focus();
		return false;
	}
	
	if(document.frm1.sub_email.value=="")
	{
		alert("Please enter your email");
		document.frm1.sub_email.focus();
		return false;
	}
	if (document.frm1.sub_email.value!="")
 		{
			var x = document.frm1.sub_email.value;
			var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if (filter.test(x)==false)
			{ 
				alert('Please enter a valid email address');
				document.frm1.sub_email.focus();
				return false;
			}
		
  		}
	return true
}
 
</script>
	<table width="100%" cellpadding="6" cellspacing="0">
		<tr>
        	<td class="page_title_bar">
            Subscribe With Us
            </td>
        </tr>
		<tr>
			<td align=center valign="top" height="300">
				<form method="post" action="os_email_subscribe2.php" onsubmit="return frmValidate(this)" name="frm1">
                <table width="90%">
					<tr>
						<td colspan="2">
						
							Subscribe with us to keep you up to date with our latest products, news and events.
                            
                            <br /> <br />
                            <i>Please note that <?= $websitename_eng ?> does not share, rent or sell e-mail information with anyone. For more information, please see our <a href="os_tnc.php">privacy policy</a>.</i>

						</td>
					</tr>
					<tr>
                    	<Td>First Name </Td><td><input type="text" size="30" maxlength="100" name="sub_first_name" /></td>
                    </tr>
                    <tr>
                    	<Td>Last Name </Td><td><input type="text" size="30" maxlength="100" name="sub_last_name" /></td>
                    </tr>
                    <tr>
                    	<Td>Your Email </Td><td><input type="text" size="30" maxlength="100" name="sub_email" /></td>
                    </tr>
                    <tr valign="top">
                    	<Td>Security Check</Td>
                        <td>
                         <script>
						var RecaptchaOptions = {  
							theme : 'custom',  
							lang: 'en',  
							custom_theme_widget: 'divrecaptcha' //div enclosing widget elements  
						 };  
						</script>
                        <div id="divrecaptcha" style="display: none;">
			
									<div id="controls"><a href="#" onclick="Recaptcha.reload(); ">Get
									another Captcha</a> <br />
									</div>
						
									<div id="recaptcha_image"></div>
									<!--Important-->
						
									<p><input type="text" name="recaptcha_response_field"
										id="recaptcha_response_field" /><!--Important--> <br />
									<span class="recaptcha_only_if_image">Enter the words shown above
									separated by space</span>
									
									</div>
                        <?
                        	 require_once('required/recaptchalib.php');
                             
                             echo recaptcha_get_html($captcha_key_public);
						?>
                        </td>
                    </tr>
                    <tr>
                    	<td colspan="2" align="center">
                        	<input type="submit" class="button" name="btnsubmit" value="Subscribe Now" />
                        </td>
                    </tr>
				</table>
                </form>
			</td>
		</tr>
	</table>	

<?  require("required/footer.php"); ?>